<div class="page-products page-search">
	<div class="sorts-wrap clearfix">
		<div class="sort" ng-class="{'curr':searchParams.sort == 'sort_order'}" ng-click="sort('sort_order')">综合<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'sort_order' && searchParams.order == 'asc','desc':searchParams.sort == 'sort_order' && searchParams.order == 'desc'}"></i></div>
		<div class="sort" ng-class="{'curr':searchParams.sort == 'quantity'}" ng-click="sort('quantity')">销量<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'quantity' && searchParams.order == 'desc','desc':searchParams.sort == 'quantity' && searchParams.order == 'asc'}"></i></div>
		<div class="sort" ng-click="sort('price')" ng-class="{'curr':searchParams.sort == 'price'}">价格<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'price' && searchParams.order == 'asc','desc':searchParams.sort == 'price' && searchParams.order == 'desc'}"></i></div>
		<!-- <div class="sort" ng-click="sort('minium')" ng-class="{'curr':searchParams.sort == 'minium'}">起批<i class="icon icon-arrow" ng-class="{'asc':searchParams.sort == 'minium' && searchParams.order == 'asc','desc':searchParams.sort == 'minium' && searchParams.order == 'desc'}"></i></div> -->
		<div class="sort" ng-click="showFilterPanel()" ng-class="{'curr':filtering}">
			筛选<i class="icon icon-filter"></i>
		</div>
	</div>
	<div class="common-search" ng-if="helps.length>0">
		<div class="title-wrap clearfix">
			<div class="title">推荐搜索：</div>
		</div>
		<div class="commons-list clearfix">
			<div class="commons-item" ng-repeat="(key,help) in helps" ng-if="key<6"><div class="auto-cut-word-line"><a href="index.php?route=common/index#/products?search={{help}}">{{help}}</a></div></div>
			<div ng-if="helps.length<1">暂时无相关推荐</div>
		</div>
	</div>
	<ul class="products-list">
		<li class="product-item" ng-repeat="product in products" ng-if="products && products.length>0">
			<table>
				<tr>
					<td class="product-image-wrap">
						<div style="position:relative;" ng-click="jump('/product/'+product.id,true)">
							<img ng-src="{{product.image}}">
							<div class="p-icon lp">
								<img ng-if="product.show_new==1" ng-src="image/tag/new.png">
							</div>
							<div class="p-icon rp">
								<img ng-if="product.recommend==1" ng-src="image/tag/recommend.png">
								<img ng-if="product.clearance==1 && product.show_clearance==1" ng-src="image/tag/clearance.png">
								<img ng-if="product.promotion==1" ng-src="image/tag/promotion.png">
							</div>
							<div class="top-left-icon" ng-show="product.upc==1">
								<img ng-src="catalog/view/theme/bhz/m/images/628logo.png">
							</div>
							<div class="top-left-icon" ng-show="product.upc==2">
								<img ng-src="catalog/view/theme/bhz/m/images/miaoshaicon.png">
							</div>
							<div class="bottom-left-icon" ng-show="product.upc==1">
								<div class="count-number">{{product.jan}}</div>
							</div>
						</div>
						<div ng-if="product.show_cart==1" style="text-align: center;"><a style="text-decoration: underline;font-size:14px;color:#212121" href="javascript:void(0);" ng-click="addToCart(product)">加入进货单</a></div>
						<div ng-if="product.show_cart==2" style="text-align: center;color:red;font-size:14px;">正在备货中</div>
					</td>
					<td class="product-info-wrap" ng-click="productInfo(product.id)">
						<div>
							<div class="name auto-cut-word-two-line"><span ng-if="product.lack_status == 2">D-</span><span ng-if="product.lack_status == 3">I-</span>{{product.name}}</div>
							<div class="stock-tips" ng-if="product.lack_status == 2 || product.lack_status == 3">{{product.lack_reason}}</div>
							<div class="price-wrap">
								<span class="price">{{product.special_formated}}</span>
								<span class="price-old">{{product.price_formated}}</span>
								<span class="stock-count" ng-if="product.clearance==1|| product.lack_status == 3||myuserId!=0">库存({{product.clearqty}})</span>
							</div>
						</div>
					</td>
				</tr>
			</table>
		</li>
		<div class="no-products" ng-if="products===false || products.length<1">没有查询到任何商品...</div>
		<div class="loading" ng-show="!withoutMore" id="LoadingPlace">正在加载...</div>
	</ul>
	<section>
		<div class="filter-panel" ng-class="{'show':showFilterPanelFlag}">
			<div class="top-bar clearfix">
				<i class="icon icon-back"></i>
				<span class="text">筛选</span>
				<a class="btn-filter" href="javascript:void(0);" ng-click="filter();">确定</a>
			</div>
			<ul class="accordion">
				<li class="filter-item" ng-repeat="filterGroup in filterGroups" ng-init="filterGroup.showOptions = false">
					<a href="javascript:void(0);" class="filter-item-link" ng-click="filterGroup.showOptions = !filterGroup.showOptions">
					  {{filterGroup.name}}
						<i class="icon icon-arrow-right"></i>
						<span class="text" ng-class="{'text-red':filterGroup.currOption.name}">{{filterGroup.currOption.name || '不限'}}</span>
					</a>
					<ul class="options" ng-if="filterGroup.showOptions">
						<li class="option-item" ng-repeat="filterOption in filterGroup.filter">
							<a class="option-item-link clearfix" href="javascript:void(0);" ng-click="selectOption(filterGroup,filterOption);">
								<span class="item-text">{{filterOption.name}}</span>
								<i class="icon icon-tick" ng-if="filterGroup.currOption && filterGroup.currOption.filter_id == filterOption.filter_id"></i>
							</a>
						</li>
					</ul>
				</li>
			</ul>
		</div>
	</section>
	<div class="cover" ng-if="showFilterPanelFlag" ng-click="closeFilterPanel()"></div>
</div>
